#include "stdafx.h"
#include "tile.hpp"

#include <string.h>

namespace Data {

Tile::Tile()
    :_groundVariant(0)
{
    for (uint i = 0; i < KEYPOINTS_COUNT; ++i)
        _keyPointHeights[i] = 0.0f;
}

Tile::~Tile()
{
}

uint Tile::ground() const
{
    return _groundVariant;
}

float Tile::keyPoint(uint index) const
{
#ifdef _DEBUG
    assert(index < KEYPOINTS_COUNT);
#endif
    return _keyPointHeights[index];
}

void Tile::setGround(uint variant)
{
    _groundVariant = variant;
}

void Tile::setKeyPoint(uint index, float height)
{
#ifdef _DEBUG
    assert(index < KEYPOINTS_COUNT);
#endif
    _keyPointHeights[index] = height;
}

} // namespace Data
